<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>Untitled Page</title>
	<script type="text/javascript">

window.onload = function()
{
	// Get the editable IFRAME.
	var win = window.frames[ 'xEditorArea' ] ;
	var doc = win.document ;

	// Fill the document with its startup contents.
	doc.open() ;

	doc.write( '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">' ) ;

	doc.write( '<html>' ) ;
	doc.write( '<head><title></title>' ) ;
	doc.write( '</head><body>' ) ;
	doc.write( '<p style="height:300px">&nbsp;</p>' ) ;
	doc.write( '<p id="xHidden">&nbsp;</p>' ) ;
	doc.write( '</body></html>' ) ;

	doc.close() ;

	// Start editing on it.
	doc.designMode = 'on' ;

	// Make the caret blinking there.
	win.focus() ;

	// Get the element to which we want the caret blinking inside.
	var p = window.frames[ 'xEditorArea' ].document.getElementById( 'xHidden' ) ;

	// Move the selection to the start of the <p id="xHidden"> contents.
	var sel = win.getSelection();

	var range = document.createRange();
	range.selectNodeContents( p );
	range.collapse( true );

	sel.removeAllRanges() ;
	sel.addRange( range ) ;
}

	</script>
</head>
<body>
	<p>
		Reduced TC for <a href="http://dev.fckeditor.net/ticket/1462">#1462</a> (second
		attempt).</p>
	<p>
		This page should have the IFRAME scrolled down, so the blinking caret position is
		visible. The selection position should be always visible, even when set by code.
		Only IE supports it.</p>
	<p>
		Just load this page. The caret position will not be visible until you start typing.</p>
	<hr />
	<iframe id="xEditorArea" name="xEditorArea" src="about:blank" width="100%" height="200"
		style="border: #000000 1px solid;"></iframe>
</body>
</html>
